home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000824-20010305 / 000309_news@columbia.edu _Mon Feb 19 10:16:20 2001.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id KAA23622
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Mon, 19 Feb 2001 10:16:20 -0500 (EST)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA02621
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Mon, 19 Feb 2001 10:16:19 -0500 (EST)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id KAA02846
  10.     for kermit.misc@watsun.cc.columbia.edu; Mon, 19 Feb 2001 10:13:53 -0500 (EST)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: fdc@columbia.edu (Frank da Cruz)
  13. Subject: Re: commandline ftp-client
  14. Date: 19 Feb 2001 15:13:52 GMT
  15. Organization: Columbia University
  16. Message-ID: <96rd7g$2os$1@newsmaster.cc.columbia.edu>
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <96rbhi$hp2$1@news.hccnet.nl>,
  20. Martijn Hams <mbhams@hotmail.com> wrote:
  21. : How can i delete a dir on a ftpserver when it's not empty using
  22. : kermit?
  23. Thanks for taking a look at Kermit's new FTP client.
  24.  
  25. As you know, UNIX does not allow you to delete a non-empty directory,
  26. so you must first delete all the files in the directory.  Then you can
  27. delete the directory.
  28.  
  29. : example:
  30. : i connect to a ftpserver.
  31. : i switch to the pub-dir with "ftp cd pub"
  32. : how can i delete dir1 with all his subdirs with 1 command when the tree
  33. : looks like this:
  34. : /pub/dir1/dir2/dir3
  35. Something like this requires cooperation between the client and the server.
  36. Unfortunately FTP protocol does not allow for recursion (even though some
  37. FTP servers do allow for it in a kind of backhanded way, unofficially).
  38. There is a great debate over what the server's response should be to the
  39. NLST command -- should it send a recursive list (even though the protocol
  40. defines no way to ask for one) or a "flat" one?  Should the list include
  41. path information or just the basename?  Should the list include directory
  42. names?  RFC 959 doesn't say.  So as you can imagine, each FTP server can,
  43. and usually does, interpret the specification differently.  Kermit tries to
  44. sense and handle each interpretation but if the server does not recurse,
  45. there's not much the client can do about it.
  46.  
  47. If the FTP server returns a recursive file list with path information, then
  48. Kermit's command:
  49.  
  50.   ftp delete /recursive *
  51.  
  52. should delete the tree.  You might also need to do something like this:
  53.  
  54.   ftp delete /recursive .*
  55.   ftp delete /recursive *
  56.  
  57. to get the dot-files first, in case the FTP server's pattern matcher does
  58. not pick up dot files.
  59.  
  60. There are Internet drafts circulating that propose a way to clear up all
  61. this confusion, but so far they are not accepted and in any case you won't
  62. find the new methods (e.g. the MLST command) implemented in any but a
  63. few experimental FTP servers.
  64.  
  65. - Frank